<template>
  <view class="container">
    <!-- 头部 -->
    <!-- <view class="head"
      style="background-color: #ffcc00;
      height: 180rpx;
      display: flex;">
      <img
        style="height: 50rpx;
        width: 50rpx;
        padding: 10rpx;
        margin-top: 15%;"  
        src="../../../../../static/tabbar/返回.png" 
        alt="" 
        @click="handleBack"
      />
    
    </view> -->

    <!-- 外部图片 -->
    <image :src="service.externalServiceImage" class="service-image" mode="widthFix" />

    <!-- 服务须知 -->
    <view class="notice">
      <text class="title">服务须知</text>
      <rich-text :nodes="service.notice"></rich-text>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

const service = ref({})

onLoad((options) => {
  if (options.service) {
    service.value = JSON.parse(decodeURIComponent(options.service))
  }
})

const handleBack = () => {
  uni.navigateBack()
}
</script>

<style scoped lang="scss">
.container {
  padding: 32rpx;
  background-color: #fff;
  min-height: 100vh;
}

.service-image {
  width: 100%;
  height: 25vh;
  border-radius: 16rpx;
  margin-bottom: 16rpx;
}

.notice {
  padding: 24rpx;
  background-color: #f5f5f5;
  border-radius: 16rpx;
  margin-top: 24rpx;

  .title {
    font-size: 32rpx;
    font-weight: bold;
    margin-bottom: 16rpx;
    display: block;
  }
}
</style> 